<%@ page 
language="java" 
import="java.util.*" 
import="com.csd.helper.IConstant"
import="com.csd.vo.*"
import="com.csd.pojo.Teacher"
import="com.csd.pojo.Project"
pageEncoding="UTF-8"
%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
HttpSession s = request.getSession();
UserVO uvo =  (UserVO)s.getAttribute(IConstant.userVO);
if(uvo==null || !uvo.getType().equals(IConstant.teacherRole))
{
	response.sendRedirect(path);
}
	List<TeacherTaskVO> evaluateProTask = (List<TeacherTaskVO>) request.getAttribute("evaluateProTask");
	List<TeacherTaskVO> changeTask = (List<TeacherTaskVO>) request.getAttribute("changeTask");
	List<TeacherTaskVO> finishTask = (List<TeacherTaskVO>) request.getAttribute("finishTask");
	List<TeacherTaskVO> projectApplyWaitReview = (List<TeacherTaskVO>) request.getAttribute("projectApplyWaitReview");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>我的任务表</title>
		<link href="<%=path %>/teacher/css/teacher_right.css" rel="stylesheet" type="text/css" />
	</head>

	<body>
		<div class="main">
			<h1>
				我的任务表
			</h1>
			<hr />
			
			<h3>项目申请需要审批的任务	</h3>
			<table width="100%">
				<tr>
					<td class="table_head" width="100px">项目类别</td>
					<td class="table_head" width="200px">项目名称</td>
					<td class="table_head" width="100px">项目负责</td>
					<td class="table_head">操作</td>
				</tr>
				<tr>
					<%
					   if(projectApplyWaitReview != null && projectApplyWaitReview.size()>0)
						{   
							for (int i = 0; i < projectApplyWaitReview.size(); i++) {
							 TeacherTaskVO teacherTaskVO = projectApplyWaitReview.get(i);
					%>
					<td><%=teacherTaskVO.getProjectType() %></td>
					<td><%=teacherTaskVO.getProjectName()%></td>
					<td><%=teacherTaskVO.getLeader()%></td>
					<td>
						<a href="<%=path %>/projectInfoShow.action?projectID=<%=teacherTaskVO.getProjectID()%>&evaluateItemID=<%=teacherTaskVO.getEvaluateID()%>&returnpage=<%=path%>/teacherTaskList.action">详细</a>
						|
						<a
							href="<%=path %>/projectApplyReview.action?projectID=<%=teacherTaskVO.getProjectID()%>&result=pass">通过</a>
						|
						<a
							href="<%=path %>/projectApplyReview.action?projectID=<%=teacherTaskVO.getProjectID()%>&result=reject">驳回</a>
					</td>
				</tr>
				<%
					}}else{
					
				%>
                <tr><td colspan="4" align="center">暂无记录</td></tr>
				<%} %>
			</table>

			<h3>&nbsp;</h3>
			
			<h3>
				需要评审的任务
			</h3>
			<table width="100%">
				<tr>
					<td class="table_head" width="100px">
						项目类别
					</td>
					<td class="table_head" width="200px">
						项目名称
					</td>
					<td class="table_head" width="100px">
						评审阶段
					</td>
					<td class="table_head">
						操作
					</td>
				</tr>
                <%if(evaluateProTask.size()>0){%>
				<tr>
					<%
						for (int i = 0; i < evaluateProTask.size(); i++) {
							TeacherTaskVO teacherTaskVO = evaluateProTask.get(i);
					%>
					<td><%=teacherTaskVO.getProjectType()%></td>
					<td><%=teacherTaskVO.getProjectName()%></td>
					<td><%=teacherTaskVO.getEvaluateStage()%></td>
					<td>
						<a href="<%=path %>/projectInfoShow.action?projectID=<%=teacherTaskVO.getProjectID()%>&evaluateItemID=<%=teacherTaskVO.getEvaluateID()%>&returnpage=<%=path%>/teacherTaskList.action">详细</a>
					</td>
				</tr>
					<%}%>
                <%}else{%>
                	<tr><td colspan="4" align="center">暂无记录</td></tr>
                <%}%>
			</table>

			<h3>&nbsp;</h3>

			<h3>需要审批变更的任务</h3>
			<table width="100%">
				<tr>
					<td class="table_head" width="100px">
						项目类别
					</td>
					<td class="table_head" width="200px">
						项目名称
					</td>
					<td class="table_head" width="100px">
						项目负责人
					</td>
					<td class="table_head">
						操作
					</td>
				</tr>
                <%if(changeTask.size()>0){%>
                <% 
					System.out.println("changeTask.size()"+changeTask.size());
					for (int i = 0; i < changeTask.size(); i++) {
					TeacherTaskVO teacherTaskVO = changeTask.get(i);
				%>
				<tr>
					<td><%=teacherTaskVO.getProjectType()%></td>
					<td><%=teacherTaskVO.getProjectName()%></td>
					<td><%=teacherTaskVO.getLeader()%></td>
					<td>
                  		<a href="<%=path %>/changeRecordDetail.action?changeRecordID=<%=teacherTaskVO.getChangeID()%>&returnpage=<%=path %>/teacherTaskList.action">变更详细</a> 																						
                        &nbsp;|&nbsp;
						<a href="<%=path %>/projectInfoShow.action?projectID=<%=teacherTaskVO.getProjectID()%>&evaluateItemID=<%=teacherTaskVO.getEvaluateID()%>&returnpage=<%=path%>/teacherTaskList.action">项目详细</a>
					</td>					
				</tr>
                 <%}%>
               <%}else{%>
               		<tr><td colspan="4" align="center">暂无记录</td></tr>
               <%}%>
           </table>
           
           <h3>&nbsp;</h3>
           
			<h3>需要审批结题的任务	</h3>
			<table width="100%">
				<tr>
					<td class="table_head" width="100px">项目类别</td>
					<td class="table_head" width="200px">项目名称</td>
					<td class="table_head" width="100px">项目负责</td>
					<td class="table_head">操作</td>
				</tr>
				<tr>
					<%
					   if(finishTask != null && finishTask.size()>0)
						{   
							for (int i = 0; i < finishTask.size(); i++) {
							 TeacherTaskVO teacherTaskVO = finishTask.get(i);
					%>
					<td><%=teacherTaskVO.getProjectType() %></td>
					<td><%=teacherTaskVO.getProjectName()%></td>
					<td><%=teacherTaskVO.getLeader()%></td>
					<td>
						<a href="<%=path %>/projectInfoShow.action?projectID=<%=teacherTaskVO.getProjectID()%>&evaluateItemID=<%=teacherTaskVO.getEvaluateID()%>&returnpage=<%=path%>/teacherTaskList.action">详细</a>
						|
						<a
							href="<%=path %>/teacherFinishEvaluate.action?projectID=<%=teacherTaskVO.getProjectID()%>&result=pass">通过</a>
						|
						<a
							href="<%=path %>/teacherFinishEvaluate.action?projectID=<%=teacherTaskVO.getProjectID()%>&result=reject">驳回</a>
					</td>
				</tr>
				<%
					}}else{
					
				%>
                <tr><td colspan="4" align="center">暂无记录</td></tr>
				<%} %>
			</table>
		</div>
	</body>
</html>
